package com.achilles.micard;

import android.os.Bundle;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.view.Menu;

public class MainActivity extends Activity {

    private final String PACKAGE_NAME = "com.miui.tsmclient";
    private final String ACTIVITY_NAME = PACKAGE_NAME
            + ".ui.quick.DoubleClickActivity";
    private final String ACTION = "com.miui.intent.action.DOUBLE_CLICK";
    private final int FLAG = 0x10800000;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        ComponentName toActivity = new ComponentName(PACKAGE_NAME,
                ACTIVITY_NAME);

        Intent intent = new Intent();
        intent.setAction(ACTION);
        intent.setFlags(FLAG);
        intent.setComponent(toActivity);

        startActivity(intent);

        finish();
    }
}
